<template>
	<view class="mask flex flex-direction align-center justify-center">
		<view @touchmove.stop.prevent="clear">
			<view class="flex align-center justify-center">
				<view style="width: 600rpx;background-color: #FFFFFF;border-radius: 10rpx;">
					<view class="flex flex-direction justify-center align-center" style="padding: 40rpx;">
						<view style="font-weight: 600;font-size: 34rpx;color: #191919; ">权限信息</view>
						<view style="font-size: 26rpx;color: #191919;margin-top: 10rpx;">请先打开{{title}}权限</view>
					</view>
					<view class="flex" style="height: 100rpx;border-top: 1rpx solid rgba(235,235,235,1);">
						<view @click="back"
							style="flex: 1;line-height: 100rpx;text-align: center;font-size: 32rpx; color: #191919;">取消
						</view>
						<view @click="goSetting" class="themBackColor"
							style="flex: 1;line-height: 100rpx;text-align: center;font-size: 32rpx;border-bottom-right-radius: 10rpx;">
							确认</view>
					</view>
				</view>
			</view>
			<!-- <view class="popup_content">
				<view style="padding: 40upx 20upx 0;">
					<view class="title">权限信息</view>
					<view class="explain_text">
						请先打开{{title}}权限
					</view>
				</view>

				<view class="button">
					<view @tap="back" style="width: calc(100% / 2);">取消</view>
					<view @tap="goSetting" class="themBackColor" style="width: calc(100% / 2);padding: 28upx 0;">确认</view>
				</view>
			</view> -->
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: ''
			}
		},
		onLoad(e) {
			console.log(e,'啊啊啊')
			this.title = decodeURIComponent(e.title)
		},
		onBackPress(e) {
			if (e.from == 'navigateBack') {
				return false;
			}
			return true
		},
		methods: {
			// 禁止滚动
			clear() {
				return;
			},
			back() {
				uni.navigateBack({
					delta: 1
				})
			},
			// 跳转到设置页面
			goSetting() {
				this.$permision.gotoAppPermissionSetting()
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: transparent;
	}

	.mask {
		position: fixed;
		left: 0;
		top: 0;
		right: 0;
		bottom: 0;
		background-color: rgba(0, 0, 0, 0.4);
	}

	.popup_content {
		overflow: hidden;
		box-sizing: border-box;
		// padding: 40upx 20upx 0 20upx;
		position: fixed;
		bottom: 50%;
		border-radius: 8px;
		left: 50%;
		margin-left: -40%;
		right: 0;

		background: #ffffff;
		width: 80%;
		z-index: 99;

		.title {
			text-align: center;
			font-size: 34upx;
			padding: 10upx 0 0 0;
			font-weight: 600;
		}

		.explain_text {
			font-size: 30upx;
			padding: 30upx 30upx 40upx 30upx;
			line-height: 38upx;

			.line {
				display: block;

				.path {
					color: #007aff;
					display: inline-block;
					text-align: center;
					font-size: 24rpx;
				}
			}
		}

		.button {
			display: flex;
			// padding: 20upx;
			align-items: center;
			font-size: 34upx;
			justify-content: space-between;
			border-top: 1upx solid #f2f2f2;

			view {
				text-align: center;
			}
		}
	}
</style>
